const arr = [
	{
		username:"zhangsan",
		age:12
	},{
		username:"lisi",
		age:18
	}
]
// const info = arr.find(v=>v.username === "wangwu");
// console.log(info?.username)

// || 左侧为真，获取到的是左侧的值
// || 左侧为假，获取到的是右侧的值
const info = arr.find(v=>v.username === "lisi") || {};
console.log(info.username)
